package com.itcncp.wechat.app.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.itcncp.common.plugin.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;

public class ItcsRoadInfo implements Serializable {
    /**
     * 收费公路编号 5位公路编号+2位省域编号 公路编号由一位字母标识符和四位的数字编号组配表示。若数字编号不足4位，字母标识符后以&ldquo;0&rdquo;填充，补足4位。例如G1应编码为G0001。
     *
     * @mbg.generated
     */
    @JSONField(serializeUsing= ToStringSerializer.class)
    private String tollRoadId;

    /**
     * 收费公路名称 
     *
     * @mbg.generated
     */
    private String name;

    /**
     * 技术等级 5 &mdash; 高速公路 1 &mdash; 一级公路 2 &mdash; 二级公路 3 &mdash; 三级公路 4 &mdash; 四级公路 8 &mdash; 独立桥隧 9 &mdash; 等外公路
     *
     * @mbg.generated
     */
    private Byte level;

    /**
     * 起始计费位置地点
     *
     * @mbg.generated
     */
    private String startSite;

    /**
     * 起始计费位置桩号
     *
     * @mbg.generated
     */
    private String startStakeNum;

    /**
     * 起始计费位置纬度 WGS84坐标系 单位：度 保留6位小数
     *
     * @mbg.generated
     */
    private BigDecimal startLatitude;

    /**
     * 起始计费位置经度 WGS84坐标系 单位：度 保留6位小数
     *
     * @mbg.generated
     */
    private BigDecimal startLongitude;

    /**
     * 起点收费站编号
     *
     * @mbg.generated
     */
    private String startStationid;

    /**
     * 终止计费位置地点
     *
     * @mbg.generated
     */
    private String endSite;

    /**
     * 终止计费位置桩号
     *
     * @mbg.generated
     */
    private String endStakeNum;

    /**
     * 终止计费位置纬度
     *
     * @mbg.generated
     */
    private BigDecimal endLatitude;

    /**
     * 终止计费位置经度
     *
     * @mbg.generated
     */
    private BigDecimal endLongitude;

    /**
     * 终止收费站编号
     *
     * @mbg.generated
     */
    private String endStationid;

    private static final long serialVersionUID = 1L;

    public String getTollRoadId() {
        return tollRoadId;
    }

    public void setTollRoadId(String tollRoadId) {
        this.tollRoadId = tollRoadId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Byte getLevel() {
        return level;
    }

    public void setLevel(Byte level) {
        this.level = level;
    }

    public String getStartSite() {
        return startSite;
    }

    public void setStartSite(String startSite) {
        this.startSite = startSite;
    }

    public String getStartStakeNum() {
        return startStakeNum;
    }

    public void setStartStakeNum(String startStakeNum) {
        this.startStakeNum = startStakeNum;
    }

    public BigDecimal getStartLatitude() {
        return startLatitude;
    }

    public void setStartLatitude(BigDecimal startLatitude) {
        this.startLatitude = startLatitude;
    }

    public BigDecimal getStartLongitude() {
        return startLongitude;
    }

    public void setStartLongitude(BigDecimal startLongitude) {
        this.startLongitude = startLongitude;
    }

    public String getStartStationid() {
        return startStationid;
    }

    public void setStartStationid(String startStationid) {
        this.startStationid = startStationid;
    }

    public String getEndSite() {
        return endSite;
    }

    public void setEndSite(String endSite) {
        this.endSite = endSite;
    }

    public String getEndStakeNum() {
        return endStakeNum;
    }

    public void setEndStakeNum(String endStakeNum) {
        this.endStakeNum = endStakeNum;
    }

    public BigDecimal getEndLatitude() {
        return endLatitude;
    }

    public void setEndLatitude(BigDecimal endLatitude) {
        this.endLatitude = endLatitude;
    }

    public BigDecimal getEndLongitude() {
        return endLongitude;
    }

    public void setEndLongitude(BigDecimal endLongitude) {
        this.endLongitude = endLongitude;
    }

    public String getEndStationid() {
        return endStationid;
    }

    public void setEndStationid(String endStationid) {
        this.endStationid = endStationid;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tollRoadId=").append(tollRoadId);
        sb.append(", name=").append(name);
        sb.append(", level=").append(level);
        sb.append(", startSite=").append(startSite);
        sb.append(", startStakeNum=").append(startStakeNum);
        sb.append(", startLatitude=").append(startLatitude);
        sb.append(", startLongitude=").append(startLongitude);
        sb.append(", startStationid=").append(startStationid);
        sb.append(", endSite=").append(endSite);
        sb.append(", endStakeNum=").append(endStakeNum);
        sb.append(", endLatitude=").append(endLatitude);
        sb.append(", endLongitude=").append(endLongitude);
        sb.append(", endStationid=").append(endStationid);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ItcsRoadInfo other = (ItcsRoadInfo) that;
        return (this.getTollRoadId() == null ? other.getTollRoadId() == null : this.getTollRoadId().equals(other.getTollRoadId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getStartSite() == null ? other.getStartSite() == null : this.getStartSite().equals(other.getStartSite()))
            && (this.getStartStakeNum() == null ? other.getStartStakeNum() == null : this.getStartStakeNum().equals(other.getStartStakeNum()))
            && (this.getStartLatitude() == null ? other.getStartLatitude() == null : this.getStartLatitude().equals(other.getStartLatitude()))
            && (this.getStartLongitude() == null ? other.getStartLongitude() == null : this.getStartLongitude().equals(other.getStartLongitude()))
            && (this.getStartStationid() == null ? other.getStartStationid() == null : this.getStartStationid().equals(other.getStartStationid()))
            && (this.getEndSite() == null ? other.getEndSite() == null : this.getEndSite().equals(other.getEndSite()))
            && (this.getEndStakeNum() == null ? other.getEndStakeNum() == null : this.getEndStakeNum().equals(other.getEndStakeNum()))
            && (this.getEndLatitude() == null ? other.getEndLatitude() == null : this.getEndLatitude().equals(other.getEndLatitude()))
            && (this.getEndLongitude() == null ? other.getEndLongitude() == null : this.getEndLongitude().equals(other.getEndLongitude()))
            && (this.getEndStationid() == null ? other.getEndStationid() == null : this.getEndStationid().equals(other.getEndStationid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTollRoadId() == null) ? 0 : getTollRoadId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getStartSite() == null) ? 0 : getStartSite().hashCode());
        result = prime * result + ((getStartStakeNum() == null) ? 0 : getStartStakeNum().hashCode());
        result = prime * result + ((getStartLatitude() == null) ? 0 : getStartLatitude().hashCode());
        result = prime * result + ((getStartLongitude() == null) ? 0 : getStartLongitude().hashCode());
        result = prime * result + ((getStartStationid() == null) ? 0 : getStartStationid().hashCode());
        result = prime * result + ((getEndSite() == null) ? 0 : getEndSite().hashCode());
        result = prime * result + ((getEndStakeNum() == null) ? 0 : getEndStakeNum().hashCode());
        result = prime * result + ((getEndLatitude() == null) ? 0 : getEndLatitude().hashCode());
        result = prime * result + ((getEndLongitude() == null) ? 0 : getEndLongitude().hashCode());
        result = prime * result + ((getEndStationid() == null) ? 0 : getEndStationid().hashCode());
        return result;
    }
}